<template>
  <div id="DeliverHistory">
    <el-row>
      <el-col :span="4" :offset="3">
        <div class="div_border_title">
          <h2>已投递简历状态</h2>
        </div>
      </el-col>
      <el-col :span="18" :offset="3">
        <el-tabs class="listdata" @tab-click="chooseTab">
          <el-tab-pane label="全部">
            <DeliverList :status="0" @delete="refrush"></DeliverList>
          </el-tab-pane>
          <el-tab-pane label="未查看">
            <DeliverList :status="1" @delete="refrush"></DeliverList>
          </el-tab-pane>
          <el-tab-pane label="已同意">
            <DeliverList :status="3" @delete="refrush"></DeliverList>
          </el-tab-pane>
          <el-tab-pane label="已拒绝">
            <DeliverList :status="4" @delete="refrush"></DeliverList>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import { postDataToServer } from '../../assets/js/post.js'
  import DeliverList from '@/components/deliverBox/DeliverList'

  export default {
    name: 'DeliverHistory',
    data () {
      return {
        status: 0
      }
    },
    created () {

    },
    methods: {
      refrush (state) {
        if (state === true) {
          this.$router.go(0)
        }
      },
      getPath (path) {
        if (path !== '') {
          this.$router.push({'path': path})
        }
      },
      chooseTab (obj) {
        console.log(obj)
      }
    },
    components: {
      DeliverList
    }
  }
</script>

<style scoped>
  #DeliverHistory {
    margin-top: 2em;
  }

  .listdata {
    margin-top: 2em;
    min-height: 25em;
  }
</style>
